#include "statusbar.h"
#include "ui_statusbar.h"

StatusBar::StatusBar(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::StatusBar)
{
    ui->setupUi(this);
    m_pLineStatusTimer = new QTimer(this);
    connect(m_pLineStatusTimer,&QTimer::timeout,this,[=](){
        ui->label->clear();
    });
}

StatusBar::~StatusBar()
{
    delete ui;
}

void StatusBar::onRecvMessage(QString s)
{
    m_pLineStatusTimer->start(3000);
    ui->label->setText(s);
}
